const promise = new Promise((resolve, reject) => {
 const error = true;
 if (!error) {
     resolve({ name: "John", age: 30 });
 } else {
     reject("出现了问题");
 }
});
promise
 .then(user => {
      console.log(user);
      return user.name;
 })
 .then(name => {
      console.log(name);
      return name.length;
 })
 .then(nameLength => {
      console.log(nameLength);
 })
 .catch(error => {
     console.log(error);
     return 123;
 })
.then(x => {
  console.log('This will run not matter waht',x);
})